home *** CD-ROM | disk | FTP | other *** search
/ Backpacker 2 (Sweden) / BackPacker 2 (Sweden) (Disc 1).7z / BackPacker 2 (Sweden) (Disc 1).bin / pc / instdata / inst0024 / 00033.ls < prev    next >
Encoding:
Text File  |  1997-01-01  |  980 b   |  42 lines

  1. on ScrollText dir
  2.   global gRsrcPath, gIndexText, gLineP
  3.   case dir of
  4.     "U":
  5.       set dir to -1
  6.     "D":
  7.       set dir to 1
  8.   end case
  9.   set K to the number of lines in gIndexText
  10.   if K > 18 then
  11.     set gLineP to gLineP + dir
  12.     if gLineP < 1 then
  13.       set gLineP to 1
  14.       set the visible of sprite 5 to 0
  15.       set the visible of sprite 6 to 1
  16.       exit
  17.     else
  18.       if gLineP > (K - 17) then
  19.         set gLineP to K - 17
  20.         set the visible of sprite 5 to 1
  21.         set the visible of sprite 6 to 0
  22.         exit
  23.       end if
  24.     end if
  25.     set max to gLineP + 17
  26.     set txt to EMPTY
  27.     repeat with n = gLineP to max
  28.       set txt to txt & line n of gIndexText
  29.       if n < max then
  30.         set txt to txt & RETURN
  31.       end if
  32.     end repeat
  33.     set the text of field "SavedGamesField" to txt
  34.     if gLineP > 1 then
  35.       set the visible of sprite 5 to 1
  36.     end if
  37.     if gLineP < (K - 17) then
  38.       set the visible of sprite 6 to 1
  39.     end if
  40.   end if
  41. end
  42.